package psn.zjk.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

/** Hello world! */
@SpringBootApplication

/**
 * 自动载入bean
 * 引入@Import(AutoConfigurationImportSelector.class)=》
 * getCandidateConfigurations通过SpringFactoriesLoader读取classpath下的META-INF/spring.factories文件，并返回一个字符串数组
 * 去重=》排序=》去除排除的=》触发完成事件
 */
//@EnableAutoConfiguration
@EnableWebMvc
//@NacosPropertySource(dataId = "aa", autoRefreshed = true)
// ：DelegatingWebMvcConfiguration 把注册的configurer都调用一遍
public class App {

	public static void main(String[] args) {
		SpringApplication.run(psn.zjk.springboot.App.class, args);
	}

//	public static void main(String[] args) throws IOException {
//		ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1, 2, 1000, TimeUnit.SECONDS, new SynchronousQueue());
//		threadPoolExecutor.execute(() -> {
//			ruleGrp1 {
//				Thread.currentThread().wait();
//			} catch (InterruptedException e) {
//				e.printStackTrace();
//			}
//		});
//		threadPoolExecutor.execute(() -> System.out.println(1));
//	}

}
